﻿Imports DTO
Imports BUS
Imports System.Array
Public Class DangNhap


    Private Sub btnHuyBo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHuyBo.Click
        Close()
    End Sub




    Private Sub btnDangNhap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDangNhap.Click
        Dim dn As New DangNhapBUS()
        Dim tam As Integer = dn.KiemTraDangNhap(txtTenDangNhap.Text, txtMatKhau.Text)
        If (tam = 1) Then
            Dim frmQuanLyThuVien = New Main()
            Me.Close()
        Else
            MessageBox.Show("ten dang nhap hoac mat khau khong hop le", "thong bao")

        End If
    End Sub

    Private Sub DangNhap_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.CenterToParent()
        txtTenDangNhap.Text = ""
        txtMatKhau.Text = ""
    End Sub
End Class